#include "admin.h"
#include "ui_admin.h"
#include "lend.h"

Admin::Admin(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Admin)
{
    ui->setupUi(this);

    this->setAttribute(Qt::WA_StyledBackground, true);
    this->setObjectName("widget");
    this->setStyleSheet("#widget{background-image: url(:/res/beijing.jpg);}");
}

Admin::~Admin()
{
    delete ui;
}

void Admin::on_pushButton_3_clicked()
{
    close();
}

void Admin::on_book_pushButton_clicked()
{
    Lend *l = new Lend(User_t(), 4);
    l->show();
}

void Admin::on_reader_pushButton_clicked()
{
    Lend *l = new Lend(User_t(), 3);
    l->show();
}
